<?php

namespace App\Providers;

use App\Libs\Exts\ValidatorExts;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\ServiceProvider;


class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot(){
        $this->app['validator']->resolver(function ($translator, $data, $rules, $messages){
            return new ValidatorExts($translator, $data, $rules, $messages);
        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        DB::listen(function($sql, $bindings, $time) {
//            dump($sql);
        });
    }
}
